Creating a Frame Callback Function

The following example is a simple frame callback function. Register this callback by using the capSetCallbackOnFrame1XXSBC5 macro.

// FrameCallbackProc: frame callback function

// hWnd:              capture window handle

// lpVHdr:            pointer to struct containing captured

//                    frame information

//

LRESULT PASCAL FrameCallbackProc(HWND hWnd, LPVIDEOHDR lpVHdr)

    if (!ghWndMain)

        return FALSE;

 

    wsprintf(gachBuffer, "Preview frame# %ld ", gdwFrameNum++);

    SetWindowText(ghWndMain, (LPSTR)gachBuffer);

    return (LRESULT) TRUE ;

}